package lab02.Test19;

/**
 * Created by lady on 2017/10/26.
 */
public class Change {
    public static void main(String[] args) {
        //行为;实现字符串的大小写转换并倒序输出
        System.out.println("输入：HelloWord");
        String result = "HelloWord";
    char tmp;
    int i;
        for (i = 0; i <= result.length(); i++)

                {
                tmp = result.charAt(i);
                if (tmp >= 'A' && tmp <= 'Z') {
                System.out.print((char) (tmp + 32));
                } else if
                (tmp >= 'a' && tmp <= 'z') {
                    System.out.print((char) (tmp - 32));
                }
                }
    }
}